scale

open override fun scale(factor: Double, center: Vec2): Polygon2(source)

Scales the polygon by a given factor around a center point.

Return

A new polygon with all vertices scaled.

Parameters

factor

The scaling factor.

center

The center point for scaling. Defaults to the centroid if not specified.